<% include ../pageHeader %>

<div id="mainWrapper">
    <div id="content" class="content">
        <div id="innerContent">
            <div class="textbox">
                <div class="textbox-title"><h4><%=__('edit_profile')%></h4></div>
                <div class="textbox-content">
                    <form name="editprofile" action="?act=update&id=<%=tUser.id%>" method="post">
                        <input name="_csrf" type="hidden" value="<%- ctx.csrf %>" />
                        <table cellpadding="2" cellspacing="1">
                            <tr>
                                <td class="formbox-rowheader" width="120"><%=__('username')%>:</td>
                                <td class="formbox-content">
                                    <%=helper.HTMLEncodeLite(tUser.username)%>
                                    <%if(theUser.groupID==1||theUser.id==tUser.id){%>
                                    <a href="?act=delete&id=<%=tUser.id%>" onclick="return confirm('<%=__('confirm_delete_user')%>?')"><img src="/public/<%=theCache.settings["imageFolder"]%>/icon_del.gif" title="<%=__('delete')%>" /></a>
                                    <%}%>
                                </td>
                            </tr>
                            <tr>
                                <td class="formbox-rowheader"><%=__('user_group')%>:</td>
                                <td class="formbox-content">
                                    <%if(theUser.groupID==1){%>
                                    <select name="groupID" id="groupID">
                                        <%for(var i=0;i<theCache.userGroup.length;i++){%>
                                        <option value="<%=theCache.userGroup[i].id%>"<%if(tUser.groupID==theCache.userGroup[i].id) { %>  selected="selected" <% } %>><%=helper.HTMLEncodeLite(theCache.userGroup[i].name)%></option>
                                        <%}%>
                                    </select>
                                    <%}else{%>
                                    <%=helper.HTMLEncodeLite(tUser.groupName)%>
                                    <%}%>
                                </td>
                            </tr>
                            <tr>
                                <td class="formbox-rowheader"><%=__('password')%>:</td>
                                <td class="formbox-content"><input name="oldpassword" type="password" id="oldpassword" size="16" maxlength="16" class="text" />
                                    &nbsp;<font color="#FF0000">*</font> <%=__('edit_password_req')%></td>
                            </tr>
                            <% if(theCache.settings["enableSecurityCode"]==1){ %>
                            <tr>
                                <td class="formbox-rowheader"><%=__('scode')%>:</td>
                                <td class="formbox-content"><input name="scode" size="4" maxlength="4" type="text" id="scode" class="text" />
                                    <img src="scode.asp" />&nbsp;<font color="#FF0000">*</font> <%=__('scode_req')%>
                                </td>
                            </tr>
                            <% } %>
                            <tr>
                                <td class="formbox-rowheader"><%=__('new_password')%>:</td>
                                <td class="formbox-content"><input name="password" type="password" id="password" size="16" maxlength="16" class="text" /> &nbsp; <%=__('password_req')%></td>
                            </tr>
                            <tr>
                                <td class="formbox-rowheader"><%=__('repassword')%>:</td>
                                <td class="formbox-content"><input name="repassword" type="password" id="repassword" size="16" maxlength="16" class="text" /> &nbsp; <%=__('repassword_req')%></td>
                            </tr>
                            <tr>
                                <td class="formbox-rowheader"><%=__('gender')%>:</td>
                                <td class="formbox-content">
                                    <input name="gender" type="radio" value="0"<%if(tUser.gender==0) { %> checked="checked" <% } %> /><%=__('gender0')%>
                                    <input name="gender" type="radio" value="1"<%if(tUser.gender==1) { %> checked="checked" <% } %>  /><%=__('gender1')%>
                                    <input name="gender" type="radio" value="2"<%if(tUser.gender==2) { %> checked="checked" <% } %>  /><%=__('gender2')%>
                                </td>
                            </tr>
                            <tr>
                                <td class="formbox-rowheader"><%=__('email')%>:</td>
                                <td class="formbox-content"><input name="email" size="30" maxlength="50" type="text" value="<%=helper.HTMLEncodeLite(tUser.email)%>" class="text" />
                                    <input type="checkbox" name="hideemail" value="true"<%if(tUser.hideEmail) { %> checked="checked" <% } %>  /> <%=__('email_hide')%></td>
                            </tr>
                            <tr>
                                <td class="formbox-rowheader"><%=__('homepage')%>:</td>
                                <td class="formbox-content"><input name="homepage" size="30" maxlength="50" type="text" value="<%=helper.HTMLEncodeLite(tUser.homepage)%>" class="text" /></td>
                            </tr>
                            <tr>
                                <td></td>
                                <td><input type="Submit" name="Submit" value=" <%=__('save_change')%> " class="button" /></td>
                            </tr>
                        </table>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <% include ../sidebar %>
    <div class="clear"></div>
</div>

<% include ../pageFooter %>
